<?php
/**
 * Created by PhpStorm.
 * User: zhanghua
 * Date: 2018/9/14
 * Time: 15:16
 */

namespace app\dlc\controller;


use app\common\controller\BaseController;

class PublicController extends BaseController
{

    public function login()
    {
        $this->error('请正确填写验证码！');
        $params = $this->request->param();
        if($this->request->isPost()){
            $params = $this->request->param();
            $verify = new \verify\verify();
            if (!$verify->check($params['verify'])) {
                $this->error('请正确填写验证码！');
            }

        }

        return $this->fetch();
    }


    public function logout()
    {
        echo 'logout';
    }

    //通用验证码
    public function verify()
    {
        $Verify = new \verify\verify();
        $Verify->codeSet = '0123456789';
        $Verify->length = 4;
        $Verify->imageH = 0;
        $Verify->entry();
    }


}